﻿using Adnc.Infra.Entities;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace WYT.Pro.Repository.Entities
{
    /// <summary>
    /// 物流价格
    /// </summary>
    [Table("pro_LogisticsPrice"), Comment("物流价格"), Index(nameof(LogisticsID),nameof(Code),IsUnique = true)]
    public class LogisticsPrice : EfEntity
    {
        /// <summary>
        /// 物流模板
        /// </summary>
        [Comment("物流模板")]
        public long LogisticsID { get; set; }

        /// <summary>
        /// 编码,地址编码尾部去0后的值
        /// </summary>
        [Comment("编码,地址编码尾部去0后的值")]
        public string Code { get; set; }

        /// <summary>
        /// 地址名称
        /// </summary>
        [Comment("地址编码"),MaxLength(50)]
        public string AddressName { get; set; }

        /// <summary>
        /// 地址编码
        /// </summary>
        [Comment("地址编码"), MaxLength(9)]
        public string AddressCode { get; set; }

        /// <summary>
        /// 首件件数
        /// </summary>
        [Comment("首件件数")]
        public int FirstPiece { get; set; }

        /// <summary>
        /// 首件价格
        /// </summary>
        [Comment("首件价格"), Column(TypeName = "decimal(18,2)")]
        public decimal FirstCost { get; set; }

        /// <summary>
        /// 续件件数
        /// </summary>
        [Comment("续件件数")]
        public int ContinuationPiece { get; set; }

        /// <summary>
        /// 续件费用
        /// </summary>
        [Comment("续件费用"), Column(TypeName = "decimal(18,2)")]
        public decimal ContinuationCost { get; set; }

        /// <summary>
        /// 包邮费用
        /// </summary>
        [Comment("包邮费用"), Column(TypeName = "decimal(18,2)")]
        public decimal? FreeShippingCost { get; set; }

        /// <summary>
        /// 包邮件数
        /// </summary>
        [Comment("包邮件数")]
        public int? FreeShippingCount { get; set; }
    }
}
